import React, { Component } from 'react';
import {Button, Tabs} from 'antd';
import 'antd/dist/antd.css'
import { Row, Col } from 'antd';
import '../style.css'
import WarehouseTab1 from './WarehouseTab1';
import WarehouseTab2 from './WarehouseTab2'
const {TabPane} = Tabs;

export default class WarehouseDetail extends Component {
    constructor(props:any) {
        super(props);
    }
    props = {
        chanceAction : (action:any,recoed : any) =>{},
    }
    chanceAction = () => {
        this.props.chanceAction('main','');
    }
    
    editData = () => {
        this.props.chanceAction('new','');
    }
    
    render() {
        console.log('22',this.state);
        return (
            <>
            <br/>
                <Row>
                    <Col span={6} style={{padding:'0% 2%'}}>
                        <h3 style={{fontWeight:600}}>XXXX仓位</h3>
                    </Col>
                    <Col span={3} offset={14}>
                        <Button type="default"  onClick={this.chanceAction}> 取消</Button>&nbsp;&nbsp;
                        <Button type="primary"  onClick={this.editData}> 编辑</Button>
                    </Col>
                </Row>
                <hr className="antd-hrStyle"/>
                <Tabs defaultActiveKey="1" style={{padding:'0% 2%'}}>
                    <TabPane tab="&nbsp;&nbsp;&nbsp;仓位&nbsp;&nbsp;&nbsp;" key="1">
                        <WarehouseTab1/>
                    </TabPane>
                    <TabPane tab="&nbsp;&nbsp;&nbsp;操作日志&nbsp;&nbsp;&nbsp;" key="2">
                        <WarehouseTab2/>
                    </TabPane>
                </Tabs>
            </>
            
        )
    }
}
